package org.tiny.sequence.server;/**
 * Created by MMM on 2017-01-23.
 */

import org.springframework.stereotype.Service;

/**
 * @author MMM
 * @desc 描述
 * @date 2017-01-23 15:44
 **/
@Service
public class SequenceService {
  public long nextId(){
    return IdWorker.nextId();
  }

  public long[] nextIds(int num){
    long[] ids = new long[num];
    for (int i = 0; i < num; i++){
      ids[i] = nextId();
    }
    return ids;
  }
}
